﻿using EPiServer.Common.Categories;
using EPiServer.Community.Blog;

namespace JoelAbrahamsson.BlogExtensions
{
    public static class CategoryExtensions
    {
        public static int GetEntryCount(this ICategory childCategory)
        {
            int itemCount;
            childCategory.GetCategorizedItems(typeof(Entry), 1, 1, out itemCount);
            return itemCount;
        }
    }
}
